{extend name='admin@public/content'}
{block name="content"}
<form autocomplete="off" class="layui-form layui-box modal-form-box" action="{:request()->url()}" data-auto="true" method="post">

    <div class="layui-form-item">
        <label class="layui-form-label">广告标题</label>
        <div class="layui-input-block">
            <input type="text"  name="datatitle" value='{$vo.datatitle|default=""}' placeholder="请输入单页名称" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">文章封面</label>
        <div class='layui-input-block'>
            <div class="col-sm-7 padding-left-0">
                <input style="border-right:none" name="imgurl" value="{$vo.imgurl|default=''}" class="layui-input" title="请输入链接或上传图片文件" placeholder="请输入链接或上传图片文件">
            </div>
            <div class="col-sm-3 padding-left-0">
                <button data-file="one"  data-field="imgurl" type="button" class="layui-btn layui-btn-sm" style="height:38px;line-height:38px;width:100%">上传图片文件</button>
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">广告内容</label>
        <div class='col-sm-8'>
            <textarea name="content">{$vo.content|default=''|raw}</textarea>
        </div>
    </div>


    <div class="hr-line-dashed"></div>

    <div class="layui-form-item text-center">
        {if isset($vo['id'])}<input type='hidden' value='{$vo.id}' name='id'>{/if}
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' onclick="window.history.back()">取消编辑</button>
    </div>
    <script>window.form.render();</script>

    <script>
        /*! 实例富文本编辑器  */
        require(['ckeditor'], function () {
            window.createEditor('[name="content"]', {height: 500});
        });
    </script>
    <style>
        .background-item {
            padding: 15px;
            background: #efefef;
        }

        .background-item thead tr {
            background: #e0e0e0
        }
    </style>
</form>
{/block}
